import { IAppSetting, ILocale } from '@/store/types';

const lang = navigator.language;
let localeLang: ILocale;

switch (lang.toLowerCase().replace(/-/g, '_')) {
  case ILocale.ZH_CN.toLowerCase():
    localeLang = ILocale.ZH_CN;
    break;
  case ILocale.EN.toLowerCase():
    localeLang = ILocale.EN;
    break;
  default:
    localeLang = ILocale.ZH_CN;
}
export const appConfigSetting: IAppSetting = {
  configLocal: {
    locale: localeLang,
    fallback: localeLang,
  },
  configMenu: {
    collapse: false,
    mobileMenuOpen: false,
  },
};
